<?php

/**
 * AbetSectionsCourse form base class.
 *
 * @method AbetSectionsCourse getObject() Returns the current form's model object
 *
 * @package    sfproject
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAbetSectionsCourseForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                      => new sfWidgetFormInputHidden(),
      'cou_num'                 => new sfWidgetFormInputHidden(),
      'stu_t'                   => new sfWidgetFormInputHidden(),
      'cou_hours'               => new sfWidgetFormPropelChoice(array('model' => 'AbetPlanStudy', 'add_empty' => true, 'key_method' => 'getCouHours')),
      'cou_theory_hours'        => new sfWidgetFormPropelChoice(array('model' => 'AbetPlanStudy', 'add_empty' => true, 'key_method' => 'getCouTheoryHours')),
      'cou_practical_hours'     => new sfWidgetFormPropelChoice(array('model' => 'AbetPlanStudy', 'add_empty' => true, 'key_method' => 'getCouPracticalHours')),
      'asing_theory_sec_num'    => new sfWidgetFormInputText(),
      'unasing_theory_sec_num'  => new sfWidgetFormInputText(),
      'asing_practical_sec_num' => new sfWidgetFormInputText(),
      'sec_theory_times'        => new sfWidgetFormInputText(),
      'sec_practical_times'     => new sfWidgetFormInputText(),
      'created_at'              => new sfWidgetFormDateTime(),
      'updated_at'              => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                      => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'cou_num'                 => new sfValidatorPropelChoice(array('model' => 'AbetStuCourse', 'column' => 'cou_num', 'required' => false)),
      'stu_t'                   => new sfValidatorChoice(array('choices' => array($this->getObject()->getStuT()), 'empty_value' => $this->getObject()->getStuT(), 'required' => false)),
      'cou_hours'               => new sfValidatorPropelChoice(array('model' => 'AbetPlanStudy', 'column' => 'cou_hours', 'required' => false)),
      'cou_theory_hours'        => new sfValidatorPropelChoice(array('model' => 'AbetPlanStudy', 'column' => 'cou_theory_hours', 'required' => false)),
      'cou_practical_hours'     => new sfValidatorPropelChoice(array('model' => 'AbetPlanStudy', 'column' => 'cou_practical_hours', 'required' => false)),
      'asing_theory_sec_num'    => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'unasing_theory_sec_num'  => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'asing_practical_sec_num' => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'sec_theory_times'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'sec_practical_times'     => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'created_at'              => new sfValidatorDateTime(array('required' => false)),
      'updated_at'              => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('abet_sections_course[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetSectionsCourse';
  }


}
